<template>
	<view class="content">
		<rich-text :nodes="detail"></rich-text>
	</view>
</template>

<script>
	import {
		post_md5,
		request_integral
	} from '../../common/request'
	import {
		richText,
		setNavTitle
	} from '../../common/common'
	export default {
		data() {
			return {
				detail: ''
			}
		},
		onLoad(options) {
			this.getDetail(options)
			request_integral('placard', options.id)
		},
		methods: {
			getDetail(options) {
				const params = {
					id: options.id
				}
				post_md5('/news-app/notice/info', params).then(res => {
					if (res.data && res.data.content) {
						this.detail = richText(res.data.content)
						setNavTitle(res.data.title)
					}
				})
			}
		}
	}
</script>

<style>
	.content {
		background: #ffffff;
	}
</style>
